<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        {{msg}}

        <button @click="go('100',100)">单击</button>

        <button @click.once="run">once</button>

         <div @click.capture="fa">
             大
             <button @click="son">小</button>
         </div>

         <a @click.prevent="hrefun" href="http://www.baidu.com">百度</a>
    </div>

    <script src="js/vue.js"></script>
    <script>
        new Vue({
            el:"#app",
            data:{
                msg:"mesage01"
            },
            methods:{
                go(arg,b){
                   this.msg=Number(arg)+b;
                },
                run(){
                    console.log("run")
                },
                son(){
                    console.log("son")
                },
                fa(){
                    console.log("fa")
                },
                hrefun(){
                    location.href="http://www.baidu.com"
                }
                

            }
        })
    </script>
</body>
</html>